package com.atguigu.mybatis.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName t_customer
 */
@Data
public class Customer implements Serializable {
    /**
     * 
     */
    private Integer cId;

    /**
     * 
     */
    private String cName;

    /**
     * 
     */
    private Integer cAge;

    /**
     * 
     */
    private Double cHeight;

    /**
     * 
     */
    private Double cWeight;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Customer other = (Customer) that;
        return (this.getcId() == null ? other.getcId() == null : this.getcId().equals(other.getcId()))
            && (this.getcName() == null ? other.getcName() == null : this.getcName().equals(other.getcName()))
            && (this.getcAge() == null ? other.getcAge() == null : this.getcAge().equals(other.getcAge()))
            && (this.getcHeight() == null ? other.getcHeight() == null : this.getcHeight().equals(other.getcHeight()))
            && (this.getcWeight() == null ? other.getcWeight() == null : this.getcWeight().equals(other.getcWeight()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getcId() == null) ? 0 : getcId().hashCode());
        result = prime * result + ((getcName() == null) ? 0 : getcName().hashCode());
        result = prime * result + ((getcAge() == null) ? 0 : getcAge().hashCode());
        result = prime * result + ((getcHeight() == null) ? 0 : getcHeight().hashCode());
        result = prime * result + ((getcWeight() == null) ? 0 : getcWeight().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cId=").append(cId);
        sb.append(", cName=").append(cName);
        sb.append(", cAge=").append(cAge);
        sb.append(", cHeight=").append(cHeight);
        sb.append(", cWeight=").append(cWeight);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}